package com.elong.spring.resource;

import java.io.InputStream;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;

public class FileSourceExample {

    public static void main(String[] args) {
	try {
	    String filePath = "D:\\project_doc\\ihotel_doc\\sql\\100#mysql#elong_order#modify#waybill#guanguo.gao.txt";
	    Resource res1 = new FileSystemResource(filePath);

	    InputStream ins1 = res1.getInputStream();
	    System.out.println("res1:" + res1.getFilename());
	    
	    Resource res2 = new ClassPathResource("conf/core/elong_common-servlet.xml");
	    System.out.println("res2:" + res2.getFilename());
	} catch (Exception e) {
	    e.printStackTrace();
	}

    }
}
